import Vue from 'vue'
import App from './App.vue'
// ajax请求
import Axios from 'axios';
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import VueRouter from 'vue-router'
import routes from './routers'

Vue.config.productionTip = false;
Vue.prototype.axios = Axios;
Vue.use(VueRouter);
Vue.use(ElementUI);

const router =new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes,
});
const originalPush = VueRouter.prototype.push;
VueRouter.prototype.push = function push(location) {
  return originalPush.call(this, location).catch(err => err)
};
Vue.use(router);



new Vue({
  el: '#app',
  router,
  render: h => h(App),
}).$mount('#app');
